﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>移位运算符</title>
</head>
<body>
    <script language="JavaScript" type="text/javaScript">
        let param = 25;
        document.write("当前变量值：param=" + param + "<br>");
        document.write("变量<<2的结果：" + (param << 2) + "<br>");
        document.write("变量>>2的结果：" + (param >> 2) + "<br>");
        document.write("变量>>>2的结果：" + (param >>> 2) + "<br>");
        param = -28;
        document.write("当前变量值：param=" + param + "<br>");
        document.write("变量<<2的结果：" + (param << 2) + "<br>");
        document.write("变量>>2的结果：" + (param >> 2) + "<br>");
        document.write("变量>>>2的结果：" + (0 + (param >>> 2)));
    </script>
</body>
</html>